﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.JCI.Common.Utility
{
    public class UploadFileBaseInfo
    {
        private string _FileName = string.Empty;
        /// <summary>
        /// 上传时文件的原始名称
        /// </summary>
        public string FileOriginalName { get; set; }
        /// <summary>
        /// 上传文件保存后的名称
        /// </summary>
        public string FileName
        {
            get
            {
                if (_FileName == string.Empty)
                {
                    return Guid.NewGuid().ToString();
                }
                return _FileName;
            }
            set
            {
                _FileName = value;
            }
        }
        /// <summary>
        /// 上传文件大小
        /// </summary>
        public int FileSize { get; set; }
        /// <summary>
        /// 上传文件后缀
        /// </summary>
        public string FileExtension { get; set; }
        /// <summary>
        /// 上传文件的Content Type
        /// </summary>
        public string FileContentType { get; set; }
        /// <summary>
        /// 上传文件保存路径
        /// </summary>
        public string FilePath { get; set; }
        /// <summary>
        /// 扩展信息
        /// </summary>
        public object Tag { get; set; }
        /// <summary>
        /// 返回信息
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// 上传成功标识
        /// </summary>
        public bool IsSuccess { get; set; }
    }
}
